python swapping adjacent nodes in circular linked list